package com.qd.common.panda.domain.entity.refund;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 退款
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class ParkRefundDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "退款单不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "退款单长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String refundOrderId;
    /**
     * 订单ID
     */
    @NotBlank(message = "订单ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "订单ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orderId;
    /**
     * 订单金额
     */
    private BigDecimal orderAmount;
    /**
     * 实际支付金额
     */
    private BigDecimal payAmount;
    /**
     * 退款金额
     */
    private BigDecimal refundAmount;
    /**
     * 行程类型:0停车1充电2加油3短租
     */
    private Integer tripType;
    /**
     * 行程类型显示
     */
    private String tripTypeDisplay;
    /**
     * 处理情况:-1已申请0待处理1已退款2拒绝退款
     */
    private Integer handlingSituation;
    /**
     * 处理情况,多个逗号隔开
     */
    private String handlingSituations;
    /**
     * 处理情况显示
     */
    private String handlingSituationDisplay;
    /**
     * 申请时间
     */
    private LocalDateTime addTime;
    /**
     * 接收时间
     */
    private LocalDateTime receiveTime;
    /**
     * 处理时间
     */
    private LocalDateTime handlingTime;
    /**
     * 操作人
     */
    @NotBlank(message = "操作人不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "操作人长度不能超过{max}位", groups = DefaultGroup.class)
    private String operator;
    /**
     * 操作人显示
     */
    private String operatorDisplay;
    /**
     * 机构ID
     */
    @NotBlank(message = "机构ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "机构ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orgId;
    /**
     * 机构ID显示
     */
    private String orgIdDisplay;
    /**
     * 用户ID
     */
    @Size(max = 50, message = "用户ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String userId;
    /**
     * 手机号
     */
    @Size(max = 20, message = "手机号长度不能超过{max}位", groups = DefaultGroup.class)
    private String mobile;

    @Override
    public void freeData() {
        this.refundOrderId = null;
        this.orderId = null;
        this.orderAmount = null;
        this.payAmount = null;
        this.refundAmount = null;
        this.tripType = null;
        this.tripTypeDisplay = null;
        this.handlingSituation = null;
        this.handlingSituations = null;
        this.handlingSituationDisplay = null;
        this.receiveTime = null;
        this.handlingTime = null;
        this.addTime = null;
        this.operator = null;
        this.operatorDisplay = null;
        this.orgId = null;
        this.orgIdDisplay = null;
        this.userId = null;
        this.mobile = null;
        super.freeData();
    }
}
